<template>
    <div>
        <mt-swipe :auto="4000">
            <!-- 注意要绑定 key 属性 -->
            <!-- 将来谁使用该轮播图组件，谁为我们传递 lunbotuList -->
            <!-- 此时，lunbotuList 应该是父组件向子组件传值来设置 -->
            <mt-swipe-item v-for='item in lunbotuList' :key="item.id">
                <img :src="item.img" alt="" :class="{full:isfull}">    <!-- src属性要用 v-bind 进行绑定不然会理解为字符串进行解析 -->
            </mt-swipe-item>
        </mt-swipe>
    </div>
</template>

<script>
export default {
    props:['lunbotuList','isfull']
}
</script>

<style lang="scss" scoped>
    .mint-swipe{
        height:200px;

        .mint-swipe-item{
            text-align: center;
            /* &:nth-child(1){
                background-color:red;
            }
            &:nth-child(2){
                background-color:cyan;
            }
            &:nth-child(3){
                background-color:lightblue;
            } */
            img{
                // width:100%;
                height:100%;
            }
            .full{
                width:100%;
            }
        }
    }
</style>